Accelerating Angular Development with Ivy by Lars Gyrup Brink Nielsen & Jacob Andresen & Santosh Yadav

Accelerating Angular Development with Ivy by Lars Gyrup Brink Nielsen & Jacob Andresen & Santosh Yadav

Author:Lars Gyrup Brink Nielsen & Jacob Andresen & Santosh Yadav [Lars Gyrup Brink Nielsen]
Language: eng
Format: epub
Publisher: Packt Publishing
Published: 2021-10-28T16:00:00+00:00


The Clipboard service

The Clipboard service is useful when we want to perform other operations before or after copying text to the clipboard, if the text is not easily accessible from a component template, or if we want more fine-grained control when copying big texts.

The clipboard service has two methods. The Clipboard#copy method accepts the text to copy to the clipboard and returns a Boolean value indicating whether the copy operation was successful.

For some large texts, the Clipboard#copy method fails and we have to use the Clipboard#beginCopy method instead. This method also accepts the text that we want to copy to the clipboard but returns an instance of the PendingCopy class that we must interact further with to follow through on the copy to clipboard operation. This class is discussed next.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.